From: Claudio Cambra Date: Mon, 20 Jan 2025 09:56:52 +0000 (+0800) Subject: Apply max concurrent chunk uploads retrieved from server capabilities X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~117^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=46dc2a71f7691fc5e163759175e934e14376d496;p=nextcloud-desktop.git Apply max concurrent chunk uploads retrieved from server capabilities Signed-off-by: Claudio Cambra --- diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 54a08ec2e..d68a21963 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -1151,7 +1151,11 @@ SyncOptions Folder::initializeSyncOptions() const opt._confirmExternalStorage = cfgFile.confirmExternalStorage(); opt._moveFilesToTrash = cfgFile.moveToTrash(); opt._vfs = _vfs; - opt._parallelNetworkJobs = account->isHttp2Supported() ? 20 : 6; + + const auto capsMaxConcurrentChunkUploads = account->capabilities().maxConcurrentChunkUploads(); + opt._parallelNetworkJobs = capsMaxConcurrentChunkUploads > 0 + ? capsMaxConcurrentChunkUploads + : account->isHttp2Supported() ? 20 : 6; // Chunk V2: Size of chunks must be between 5MB and 5GB, except for the last chunk which can be smaller const auto cfgMinChunkSize = cfgFile.minChunkSize();